import 'package:flutter/material.dart';
import 'package:wheel_of_fortune/utils/utils.dart';

class CheckBoxButton extends StatelessWidget {
  final isSelect;
  final onTap;
  const CheckBoxButton({this.isSelect = false,this.onTap,Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    
    return InkWell(
      onTap: this.onTap,
      child: Container(
        width: 18,
        height: 18,
        child: this.isSelect?Stack(
          children: [
            Container(
              decoration: BoxDecoration(
                color: mainColor,
                borderRadius: BorderRadius.circular(3),
              ),
            ),
            Container(
              alignment: Alignment.center,
              child: Icon(Icons.check, color: Color(0xFFFFFFFF),size: 13,),
            ),
          ],
        ):
        Container(
          decoration: BoxDecoration(
            color: whiteColor,
            borderRadius: BorderRadius.circular(3),
            border: Border.all(width: 2, color: mainColor),
          ),
        ),
      ),
    );
  }
}